package com.iwayin.core.dao.like;

import java.util.List;

import com.iwayin.core.dataobject.AskDO;
import com.iwayin.core.dataobject.LikeDO;

public interface LikeDAO {
	/**
	 * @description 添加like
	 * @author ZhangLei
	 * @param like
	 * @return
	 */
	public Long addLike(LikeDO like);

	/**
	 * @description 取消like
	 * @author ZhangLei
	 * @param like
	 */
	public void deleteLike(LikeDO like);

	/**
	 * @description 查询是否已经喜欢
	 * @author ZhangLei
	 * @param like
	 * @return
	 */
	public boolean isLike(Long askId, Long myId);

	/**
	 * @description 获取like用户列表(最多显示3个)
	 * @author Zhanglei
	 * @param like
	 * @return
	 */
	public List<Long> findAskLikeUsers(LikeDO like);

	/**
	 * 获得喜欢次数
	 * 
	 * @param askId
	 * @return
	 */
	public Long getLikeCountByAskId(Long askId);
	/**
	 * 查询用户喜欢的ask
	 *@author Zhanglei
	 * @param ask
	 * @return
	 */
	public List<Long> findUserLikeAskIds(AskDO ask);
}